package vip.specimen.system.datasource.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * *@Author: 余浪人
 * *@Date：2021/3/31 10:09
 * *@Email:yulangren520@Gmail.com
 * *@QQ:1368419640
 **/
@Getter
@Setter
@Entity
@Table(name = "trade")
public class SystemTrade extends BaseEntity {
    @ApiModelProperty(value = "订单编号")
    private String outTradeNo; // 订单编号（唯一）
    private double totalAmount = 2; // 价格
    private String subject; // 商品   //TODO 需要为实体产品
    private String storeId; // 店铺编号
    private int timeoutExpress = 60; // 超时时间

    public SystemTrade(String outTradeNo, double totalAmount, String subject, String storeId) {
        this.outTradeNo = outTradeNo;
        this.totalAmount = totalAmount;
        this.subject = subject;
        this.storeId = storeId;
    }

    public SystemTrade(String outTradeNo, double totalAmount, String subject, String storeId, int timeoutExpress) {
        this.outTradeNo = outTradeNo;
        this.totalAmount = totalAmount;
        this.subject = subject;
        this.storeId = storeId;
        this.timeoutExpress = timeoutExpress;
    }
}
